﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace NWISPas.Repository
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");


            routes.MapRoute(
                "InPatients", // Route name
                "Patient/InPatients", // URL with parameters
                new { controller = "Pas", action = "InPatients" } // Parameter defaults
            );

            routes.MapRoute(
               "Discharges", // Route name
               "Patient/Discharges", // URL with parameters
               new { controller = "Pas", action = "Discharges" } // Parameter defaults
           );

            routes.MapRoute(
               "Patient", // Route name
               "Patient/{patientIdentifiers}", // URL with parameters
               new { controller = "Pas", action = "GetPatient" } // Parameter defaults
           );

            routes.MapRoute(
               "Locations", // Route name
               "Locations", // URL with parameters
               new { controller = "Pas", action = "Locations" } // Parameter defaults
           );

        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }
    }
}